const { Sequelize, sequelize } = require('../dao/db');

const Components = sequelize.define('Components', {
    id: {
        type: Sequelize.BIGINT(11),
        autoIncrement: true,
        primaryKey: true,
        unique: true,
        comment: '主键'
    },
    pageId: {
        type: Sequelize.BIGINT(11),
        comment: '关联页面id'
    },
    moduleId: {
        type: Sequelize.STRING,
        unique: true, //表示唯一的
    },
    componentName: {
        type: Sequelize.STRING,

    },
    moduleName: {
        type: Sequelize.STRING,
    },
}, {
    tableName: 'Components',
})
// User.sync({ force: true })
Components.sync().then(() => {
    console.log('Components表模型已经同步 ');
});
module.exports = Components